/**
 * StudentExamListService.java
 * Version 1.0.0
 * Created on 2018年9月13日
 *
 */
package com.yincheng.oes.business.exam.studentexam;

import java.util.List;

import org.apache.commons.lang3.tuple.Pair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yincheng.oes.business.util.Page;

/**
 * @author yangsy
 * @version 1.0.0
 * @since
 * 创建时间：2018年9月13日
 * <p>
 * 功能描述：
 * <p>
 * 邮箱地址：446948434@qq.com
 */
@Service
public class StudentExamListService {

    @Autowired
    private StudentExamListMapper studentExamListMapper;

    public Pair<Integer, List<QueryResultRowBean>> getListByParam(QueryParamBean param) {
        Page page = param.getPage();
        int total = studentExamListMapper.countByParam(param);
        page.setTotal(total);
        List<QueryResultRowBean> list = studentExamListMapper.selectByParam(param);
        return Pair.of(total, list);
    }
}
